package com.waitingresult.methods;

/**
 * ALL right reserved,Designed By WangShuai
 *
 * @author : WangShuai
 * @ClassName: MethodsDemo
 * @Description:
 * @date: 2021/10/31 16:11
 * @version: 1.0
 */

public class MethodsDemo {
    //方法的调用
    public static void main(String[] args) {
        // 实参
        methods(80);
    }

    //无参方法
    public static void method1() {
        System.out.println("自定义方法");
    }

    //有参方法                    // name 形参
    public static void method1(String name) {
        System.out.println("你好啊   " + name);
    }

    //带返回值的方法
    public static int method1(int a, int b) {

        return a + b;
    }

    // 逢七过
    public static void methods(int i) {
        for (int j = 0; j < i; j++) {
            if (j % 10 == 7 || j / 10 % 10 == 7 || j % 7 == 0) {
                System.out.println("过");
            } else {
                System.out.println(j);
            }
        }
    }
}
